package com.chg.mymvc.service;

import com.chg.mymvc.dao.UserDaoImpl;
import com.chg.mymvc.entity.User;

import java.util.List;

public class UserServiceImpl implements UserService {
    private UserDaoImpl us=new UserDaoImpl();


    @Override
    public void delUser(int id) {
     us.delUser(id);
    }

    @Override
    public void updateUser(User user) {
        us.updateUser(user);
    }

    @Override
    public List<User> queryAll(int page, int pagesize) {

        return us.queryAll(page,pagesize);
    }

    @Override
    public User getUserByName(String name) {

        return us.getUserByName(name);
    }

    @Override
    public User getUsersByName(String name) {
        return us.getUsersByName(name);
    }

    @Override
    public int addUser(User user) {
      return us.addUser(user);
    }

    @Override
    public User selecUsertById(int id) {
    return  us.selecUsertById(id);
    }

    @Override
    public int allcount() {
        return us.allcount();
    }
}
